package MAD;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DB {
	public static Connection conn;
	
	public Connection getConnection() throws SQLException {
		if (conn == null) {
			doConnect();
		}
		return conn;
	}
	public Connection doConnect() throws SQLException  {
		if (conn == null) {
			DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
			conn = DriverManager.getConnection(Configurations._URL, Configurations._LOG, Configurations._PWD);
		}
		return conn;
	}
	
	
}
